<!-- 引入编辑器文件 -->
<script type="text/javascript" charset="utf-8" src="{CORE_DIR}/extend/ueditor/ueditor.config.js?v=v3.0.2"></script>
<script type="text/javascript" charset="utf-8" src="{CORE_DIR}/extend/ueditor/ueditor.all.min.js?v=v2.0.1"> </script>
<script type="text/javascript" charset="utf-8" src="{CORE_DIR}/extend/ueditor/lang/zh-cn/zh-cn.js?v=1.3.5"></script>
<link type="text/css" rel="Stylesheet" href="{CORE_DIR}/extend/WordPaster/css/w.css"/>
<link type="text/css" rel="Stylesheet" href="{CORE_DIR}/extend/WordPaster/js/skygqbox.css" />
<script type="text/javascript" src="{CORE_DIR}/extend/WordPaster/js/json2.min.js" charset="utf-8"></script>
<script type="text/javascript" src="{CORE_DIR}/extend/WordPaster/js/skygqbox.js" charset="utf-8"></script>
<script type="text/javascript" src="{CORE_DIR}/extend/WordPaster/js/w.edge.js" charset="utf-8"></script>
<script type="text/javascript" src="{CORE_DIR}/extend/WordPaster/js/w.app.js" charset="utf-8"></script>
<script type="text/javascript" src="{CORE_DIR}/extend/WordPaster/js/w.file.js" charset="utf-8"></script>
<script type="text/javascript" src="{CORE_DIR}/extend/WordPaster/js/w.js" charset="utf-8"></script>
<script>
//初始化编辑器
$(document).ready(function (e) {
	var ue = UE.getEditor('editor',{
		maximumWords:30000 
	});
})
</script>

<div id="wordpaster-container"></div>
<script type="text/javascript">
    WordPaster.getInstance({ui:{render:'wordpaster-container'}});//加载控件
   <!-- 解决源码模式无法保存 -->
  function editor_init() {
		var ue = UE.getEditor('editor');
		ue.ready(function() {
    	    ue.addshortcutkey({
    	        "wordpaster": "ctrl+86"
    	    });
		});

      $('#edit').submit(function () {
          editor=UE.getEditor('editor');
          if(editor.queryCommandState('source')==1) editor.execCommand('source');
      })
  }
 
  <!-- 点击后添加到编辑器 -->
  $(".addedit").on("click",'img',function(){
	    editor=UE.getEditor('editor');
		$img = $(this).attr("src");
		editor.execCommand('inserthtml',"<img src='"+$img+"'>");
   });

</script>

<script type="text/javascript">editor_init();</script>



